﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/WorkFlow/WFConfigure/MpWorkflow.master" Inherits="WorkFlow_WFTaskBar_WFWorks" Codebehind="WFWorks.aspx.cs" %>

<%@ Register Assembly="OT.WebControls" Namespace="OT.WebControls" TagPrefix="OT" %>

<%@ Register Src="../Control/WFLinkButtons.ascx" TagName="WFLinkButtons" TagPrefix="uc1" %>

<%@ MasterType VirtualPath="~/WorkFlow/WFConfigure/MpWorkflow.master" %>
<%@ Import Namespace="Honestysoft.Workflow.Model" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script language="javascript" type="text/javascript" src="../js/WFScript.js"></script>

<table width="100%"  border="0" cellspacing="0" cellpadding="6">
  <tr>
    <td>
<ul id="maintab" class="shadetabs">
<% if (Request["type"] + "" == "" || Request["type"] == "1")
   { %>
<li class="selected" ><a href="#default"  >待   办</a>
 <% }
   else  {%>
  <li><a href="<%=WorkflowApply.Home %>WorkFlow/WFTaskBar/WFWorks.aspx?type=1&BillID=<%=Request["BillID"]+"" %>">待   办</a><%} %> </li>
<% if (Request["type"] == "2")
   { %>
<li class="selected" ><a href="#default"  >已   办</a>
 <% }
   else  {%>
  <li><a href="<%=WorkflowApply.Home %>WorkFlow/WFTaskBar/WFWorks.aspx?type=2&BillID=<%=Request["BillID"]+"" %>">已   办</a><%} %> </li>
<% if (Request["type"] == "3")
   { %>
<li class="selected" ><a href="#default"  >办   结</a>
 <% }
   else  {%>
  <li><a href="<%=WorkflowApply.Home %>WorkFlow/WFTaskBar/WFWorks.aspx?type=3&BillID=<%=Request["BillID"]+"" %>">办   结</a><%} %> </li>
</ul>

<div id="ajaxcontentarea" class="contentstyle" >
<% if (Request["type"] == "4")
   { %>
<table width="100%"  border="0" cellspacing="0" cellpadding="5">
  <tr>
    <td><div align="right" >
        <uc1:WFLinkButtons ID="WFLinkButtons1" runat="server" />
        &nbsp;
    </div></td>
  </tr>
</table><%} %>
<table width="100%"  border="0" cellpadding="3" cellspacing="3" id="label_main">
  <tr>
  <td>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="100%">
        <Columns>
            <asp:TemplateField>
                <ItemTemplate>
                    <input type="checkbox" name="chkID" id="chk<%# DataBinder.Eval(Container.DataItem,"BuDataID") %>"  value="<%# DataBinder.Eval(Container.DataItem,"BuDataID") %>" >
                </ItemTemplate>
                <ItemStyle Width="25px" />
                <HeaderTemplate>
                    <input type="checkbox" name="chkAll" value="checkbox" onclick='javascript:mCheckAll(this,"chkID")' />
                </HeaderTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="编码">
                <ItemTemplate>
                    <%# DataBinder.Eval(Container.DataItem, "BuDataDisCode")%>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="主题">
                <ItemTemplate>
                    <%# GetEditLinkButton(((WFWorkBench)Container.DataItem).CurActTemplate,DataBinder.Eval(Container.DataItem,"BuDataID")+"",DataBinder.Eval(Container.DataItem, "BuDataName") + "") %>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="当前环节">
                <ItemTemplate>
                    <%# ((WFWorkBench)Container.DataItem).CurActTemplate.Name%>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="80px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="当前处理者">
                <ItemTemplate>
                    <%# ((WFWorkBench)Container.DataItem).Transactor.UserName%>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="80px" />
            </asp:TemplateField>      
            <asp:TemplateField HeaderText="流程操作">
                <ItemTemplate>
                    <%# WFLinkButtons1.GetWFButtonsUrl(WorkflowApply.WFEmployee.UserID,DataBinder.Eval(Container.DataItem, "BillCode")+"",DataBinder.Eval(Container.DataItem,"BuDataID")+"") %>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center"  />
            </asp:TemplateField>      
            <asp:TemplateField HeaderText="操作">
                <ItemTemplate>
                <img alt='' src= "../Images/edit.gif" /><%# GetEditLinkButton( ((WFWorkBench)Container.DataItem).CurActTemplate,DataBinder.Eval(Container.DataItem,"BuDataID")+"","编辑") %>                
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="80px" />
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    
  </td>
  </tr>
  <tr>
    <td > 
        <frameworkwebcontrols:aspnetpager id="AspNetPager1" runat="server"
                    alwaysshow="true" firstpagetext="首页" lastpagetext="尾页" nextpagetext="下一页" pageindexboxtype="DropDownList"
                    prevpagetext="上一页" showpageindex="true" showcustominfosection="Right" submitbuttontext="Go"
                    textafterpageindexbox="页" textbeforepageindexbox="转到" currentpagebuttonposition="End"
                    layouttype="Div" custominfotextalign="Right" custominfohtml="共%RecordCount%条记录。第%CurrentPageIndex%页，共%PageCount%页，每页%PageSize%条"
                    direction="LeftToRight" onpagechanged="AspNetPager1_PageChanged">
                </frameworkwebcontrols:aspnetpager>
    </td>
  </tr>
</table>
    

</div>
       

</td>
  </tr>
</table>
<input type="hidden" id="ShowInfor" runat="server" />
<script language="javascript" type="text/javascript">
if(document.getElementById("<%=ShowInfor.ClientID %>").value !="")
{
    alert(document.getElementById("<%=ShowInfor.ClientID %>").value);
    document.getElementById("<%=ShowInfor.ClientID %>").value="";
}
</script>
</asp:Content>